<HTML>
<HEAD>
</HEAD>
<BODY>
<script language="javascript">
function paintDateWeek(dateInputId,printId,linksLabel){
var dateIn=document.getElementById(dateInputId).value;
if(dateIn==null||dateIn=="undefined")return;
var dateNow=new Date(dateIn.replace(/-/g,"/"));
var dayNow=dateNow.getDay();
var dateWeek=new Array();
for(var i=0;i<7;i++){
dateWeek.push(new Date(dateNow.getTime()+(i-dayNow)*24*60*60*1000));
}
var str="";
for(var i=0;i<dateWeek.length;i++){
if(i==0)
str=dateWeek[i].getDate();
else
str=str+linksLabel+dateWeek[i].getDate();
}
alert(str);
if(printId!=null&&printId!="undefined")
document.getElementById(printId).innerHTML=str;
}
</script>
<input type="text" id="dateIn"/><input type="button" value="显示" onclick="paintDateWeek('dateIn','printDiv',',');"/>
<div id="printDiv"></div>
</BODY>
</HTML>